/**
 * @param {string[]} emails
 * @return {number}
 */
export var numUniqueEmails = function (emails) {
  const set = new Set()
  for (const email of emails) {
    const [local, domain] = email.split('@')
    const localClean = local.replace(/\+.*/, '').replace(/\./g, '')
    set.add(`${localClean}@${domain}`)
  }
  return set.size
}
